﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucGioHang.ascx.cs" Inherits="TTMarketing.UserControl.GioHang.ucGioHang" %>
<input type="hidden" runat="server" id="hiddenTest" />
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
    SelectMethod="Order_getOrder" TypeName="TTBusiness.ClassProject.clsBSBusiness">
    <SelectParameters>
        <asp:SessionParameter Name="orderlist" SessionField="order" Type="Object" />
    </SelectParameters>
</asp:ObjectDataSource>
<div id="mail" runat="server">
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="ObjectDataSource1" 
    GridLines="None" onitemcommand="RadGrid1_ItemCommand"
    EnableLinqExpressions="False"
            ShowFooter="True"  AllowPaging="True">
<MasterTableView AutoGenerateColumns="False" DataSourceID="ObjectDataSource1">
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>

<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
    <Columns>
    <telerik:GridBoundColumn DataField="Product.SeriNumber" DataType="System.String" 
            HeaderText="Mã SP" SortExpression="Product.SeriNumber" UniqueName="serinumber">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Product.Name" DataType="System.String" 
            HeaderText="Tên sản phẩm" SortExpression="Product.Name" UniqueName="Name">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Product.Price" DataType="System.Double" 
            HeaderText="Giá" SortExpression="Product.Price" UniqueName="gia" 
            DataFormatString="{0:N0} VNĐ">
        </telerik:GridBoundColumn>
       <telerik:GridTemplateColumn HeaderText="Số lượng" UniqueName="count">
            <ItemTemplate>
                <telerik:RadNumericTextBox ID="txtCount" runat="server" Culture="en-US" 
                    MinValue="1" ShowSpinButtons="True" Value="1" Width="125px" 
                    DbValue='<%# Bind("Count") %>'>
                    <NumberFormat DecimalDigits="0" />
                </telerik:RadNumericTextBox>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridCalculatedColumn HeaderText="Thành tiền" UniqueName="thanhtien" DataType="System.Double"
                    DataFields="Product.Price,count" Expression="{0}*{1}" FooterText="Tổng tiền : "
                    Aggregate="Sum" DataFormatString="{0:N0} VNĐ" 
            FooterAggregateFormatString="Tổng tiền : {0:N0} VNĐ" >
        </telerik:GridCalculatedColumn>
        <telerik:GridTemplateColumn HeaderText="Cập nhật" UniqueName="TemplateColumn2">
            <ItemTemplate>
                <asp:ImageButton ID="btnUpdate" runat="server" 
                    CommandArgument='<%# Eval("ProductId") %>' CommandName="update" 
                    ImageUrl="~/Admin/Images/Button/Save.jpg" />
            </ItemTemplate>
            <ItemStyle Width="30px" />
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn HeaderText="Xóa" UniqueName="TemplateColumn">
            <ItemTemplate>
                <asp:ImageButton ID="btnDelete" runat="server" 
                    CommandArgument='<%# Eval("ProductId") %>' CommandName="delete" 
                    ImageUrl="~/Admin/Images/Button/Delete_Grid.gif" />
            </ItemTemplate>
            <ItemStyle Width="30px" />
        </telerik:GridTemplateColumn>
        
    </Columns>
</MasterTableView>

<HeaderContextMenu EnableAutoScroll="True"></HeaderContextMenu>
</telerik:RadGrid>
    <table width="100%">
        <tr>
            <td width="200px">
                Họ và tên :</td>
            <td>
                <telerik:RadTextBox ID="txtFullName" Runat="server" Width="300px">
                </telerik:RadTextBox>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                Email :</td>
            <td>
                <telerik:RadTextBox ID="txtEmail" Runat="server" Width="300px">
                </telerik:RadTextBox>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                Điện thoại :</td>
            <td>
                <telerik:RadTextBox ID="txtPhone" Runat="server" Width="300px">
                </telerik:RadTextBox>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                Địa chỉ :</td>
            <td>
                <telerik:RadTextBox ID="txtAddress" Runat="server" Width="300px">
                </telerik:RadTextBox>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                Ghi chú :</td>
            <td>
                <telerik:RadTextBox ID="txtMessage" Runat="server" TextMode="MultiLine" 
                    Width="300px">
                </telerik:RadTextBox>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                <asp:Button ID="Button1" runat="server" onclick="Button1_Click" 
                    Text=" Gửi Đơn" onclientclick="javascript:foo();" />
&nbsp;
                <input id="Reset1" type="reset" value="Nhập lại" /></td>
            <td>
                &nbsp;</td>
        </tr>
    </table>

</div>
